package com.tanggh.action;

import com.tanggh.domain.Person;
import com.tanggh.service.PersonService;

public class PersonAction {
	
	private PersonService personService;
	
	private Person person;
	private String msg;
	
	public void setPersonService(PersonService personService) {
		this.personService = personService;
	}
	
	public void setPerson(Person person) {
		this.person = person;
	}
	public Person getPerson() {
		return person;
	}
	
	public String getMsg() {
		return msg;
	}
	
	
	public String execute() {
		personService.addPerson(person);
		
		msg = "添加成功!!!";
		
		return "success";
	}

}
